@extends('backend.layouts.app')

@section('title', $title =  '网站充值' )

@section('breadcrumb')
    <a href="">系统设置</a>
    <a href="">网站管理</a>
    <a href="">{{$title}}</a>
@endsection

@section('content')
    <div class="layui-main ">

        <fieldset class="layui-elem-field layui-field-title">
            <legend>{{ $title }}</legend>
        </fieldset>

        @if(isset($site))
            <form class="layui-form layui-form-pane " method="POST"
                  action="{{ route('site.admin_deposit.store',[$site->id]) }}">
                {{ csrf_field() }}

                <div class="layui-container ">
                    <div class="layui-card layui-bg-cyan">
                        <div class="layui-card-header layui-bg-cyan">{{$site->site_name??$site->username}}网站信息</div>
                        <div class="layui-card-body">
                            余额：{{$site->money}}<br>
                            网站代理：{{is_null($site->agent)?$site->agent->name:'系统代理'}}<br>
                        </div>
                    </div>


                    <fieldset class="layui-elem-field layui-field-title">
                        <legend>充值</legend>
                    </fieldset>
                    <div class="layui-form-item">

                        <div class="layui-inline">
                            <label class="layui-form-label">支付单号</label>
                            <div class="layui-input-inline">
                                <input type="text" name="pay_order" lay-verify="required" autocomplete="off"
                                       value=""
                                       placeholder="请输入支付单号"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">支付账户</label>
                            <div class="layui-input-inline">
                                <input type="text" name="account" lay-verify="required" autocomplete="off"
                                       value=""
                                       placeholder="请输入支付账户"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">搜索选择框</label>
                            <div class="layui-input-inline">
                                <select name="pay_type" lay-verify="required" lay-search="">
                                    <option value="">直接选择或搜索选择</option>
                                    <option value="1">支付宝</option>
                                    <option value="2">微信</option>
                                    <option value="3">银行卡</option>
                                </select>
                            </div>
                        </div>
                    </div>


                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">到账账户</label>
                            <div class="layui-input-inline">
                                <input type="text" name="to_account" lay-verify="required" autocomplete="off"
                                       value=""
                                       placeholder="请输入到账账户"
                                       class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">充值金额</label>
                            <div class="layui-input-inline">
                                <input type="text" name="money" lay-verify="required|number" autocomplete="off"
                                       value=""
                                       placeholder="请输入充值金额"
                                       class="layui-input">
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-form-item  layui-container" style="padding-top: 50px">
                    <button class="layui-btn" lay-submit="" lay-filter="demo1">提交</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </form>
        @endif
    </div>
@endsection

@section('scripts')

@endsection